package com.bidianying.controller;

import java.util.HashMap;
import java.util.Map;

import net.sf.json.JSONArray;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.bidianying.dao.GewaraDao;

@Controller
@RequestMapping("/gewara")
public class GewaraController {
	
	@Autowired
	private GewaraDao gewaraDao;
	
	@RequestMapping("/getCity")
	@ResponseBody
	public JSONArray getCity(){
		Map<String,Object> resultMap = new HashMap<String,Object>();
		JSONArray resultArray = gewaraDao.getCity();
		resultMap.put("resultJsonArray", resultArray);
		return resultArray;
	}
}
